<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});

Route::group(['middleware'=>'yl'], function () {
    //订单
    Route::any('selOrder','OrderController@selOrder')->name('selOrder');
    Route::any('delOrder/{id}','OrderController@delOrder')->name('delOrder');
    //渲染分类页面及增删改查
    Route::any('productClass','AdminController@productClass')->name('productClass');
    Route::any('proClassAdd','AdminController@proClassAdd')->name('proClassAdd');
    Route::any('proClassEdit/{id}','AdminController@proClassEdit')->name('proClassEdit');
    Route::any('proClassEditDo/{id}','AdminController@proClassEditDo')->name('proClassEditDo');
    Route::any('proClassEditDel/{id}','AdminController@proClassEditDel')->name('proClassEditDel');

//渲染商品管理及增删改查
    Route::any('save/{id}','AdminController@save')->name('save');
    Route::any('do_upt/{id}','AdminController@do_upt')->name('do_upt');
    Route::any('insert','AdminController@insert')->name('insert');
    Route::any('proDel/{id}','AdminController@proDel')->name('proDel');
    Route::any('do_ist','AdminController@do_ist')->name('do_ist');
    Route::any('project_Administrator','AdminController@project_Administrator')->name('project_Administrator');

//欢迎光临
    Route::any('welcome','AdminController@welcome')->name('welcome');
//模板母版
    Route::any('first','AdminController@first')->name('first');
    Route::any('index','MasterController@index')->name('index');


//列表显示产品
    Route::get('listProduct','ProductController@listProduct');
//添加产品
    Route::post('addProduct','ProductController@addProduct');
//日志
    Route::get('journal','LogController@journal')->name('journal');

});

//用户登录
Route::any('login','AdminController@login')->name('login');
Route::any('loginDo','AdminController@loginDo')->name('loginDo');

//用户注册
Route::any('signDo','AdminController@signDo')->name('signDo');
Route::any('sign','AdminController@sign')->name('sign');

//修改密码
Route::any('savePwd','AdminController@savePwd')->name('savePwd');
Route::any('savePwdDo','AdminController@savePwdDo')->name('savePwdDo');

//退出登录
Route::any('edit','AdminController@edit')->name('edit');


